package com.fwtai.service.api;

import com.fwtai.api.ApiDictDao;
import com.fwtai.tool.ToolClient;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 数据字典
 * @作者 田应平
 * @版本 v1.0
 * @QQ号码 444141300
 * @创建日期 2021-07-20 10:40:21
 * @官网 <url>http://www.fwtai.com</url>
*/
@Service
public class ApiDictService{

  @Resource
  private ApiDictDao apiDictDao;

  public String getDictData(final String pid){
    if(pid ==null || pid.length() <=0){
      return ToolClient.jsonValidateField();
    }
    return ToolClient.queryJson(apiDictDao.getDictData(pid));
  }

  public String getPosttype(){
    return ToolClient.queryJson(apiDictDao.getPosttype());
  }

  public String getCountry(final Long pid){
    return ToolClient.queryJson(apiDictDao.getCountry(pid));
  }

  public String getEnterpriseType(){
    return ToolClient.queryJson(apiDictDao.getEnterpriseType());
  }

  public String getVocationType(){
    return ToolClient.queryJson(apiDictDao.getVocationType());
  }

  public String getPartnerType(){
    return ToolClient.queryJson(apiDictDao.getPartnerType());
  }
}